﻿
$(document).ready(function() 
{
          $.ajax({
            type: "get",
            dataType: "json",
            async: false,
            url: "ashx/systems.ashx",
            data: { MothodName: "GetSystemTopMenu", parefolderid:"1",foldernm:$("#foldernm").val()},
            success: function(ret) 
            {
                 $(ret).each(function(i,ei){
                       $("#ParefolderidSel").append( "<option  value=\""+ei.Userfoldersid+"\">"+ei.Foldernm+"</option>");
                 })
                 $("#ParefolderidSel").onchange(function()
                 {
                          $('#ParefolderidInput').val($(this).attr("value"));
                 })
            }
        }); 

})
function   addMenu()
{
        var data = $(".pageFormContent").MyForm({datatype:"json"});
        alert(JSON.stringify(data.data));
}

function doSelect(obj) {
    var jObj = $(obj),
    imgSrc = jObj.find("img").attr("src");
    $("#IconpathInput").val(imgSrc.substr(imgSrc.lastIndexOf("/")+1));
}

function GroupSelect()
{
        var $obj =$(this);
        var $objSel = $("#GroupidSel").find(':selected');
        $('#Groupid').val($('#Groupid').val()+$objSel.attr("value")+",");
        $('#GroupidText').val($('#GroupidText').val()+$objSel.val()+",");
}

function setNoIcon(obj) {
    obj.src = '/EWFV3/WEB/Def/Inc/themes/ico/noicon.jpg';
}